Integrand size = 18, antiderivative size = 71 \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=-\frac {2 (c+d x) \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4504, 4268, 2317, 2438} \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=-\frac {2 (c+d x) \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 4268
Rule 4504
Rubi steps \begin{align*} \text {integral}& = 2 \int (c+d x) \csc (2 a+2 b x) \, dx \\ & = -\frac {2 (c+d x) \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d \int \log \left (1-e^{i (2 a+2 b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+e^{i (2 a+2 b x)}\right ) \, dx}{b} \\ & = -\frac {2 (c+d x) \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{2 b^2}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{2 b^2} \\ & = -\frac {2 (c+d x) \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {i d \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{2 b^2} \\ \end{align*}
Time = 0.21 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.99 \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=-\frac {c \log (\cos (a+b x))}{b}+\frac {c \log (\sin (a+b x))}{b}+\frac {d \left ((2 a+2 b x) \left (\log \left (1-e^{i (2 a+2 b x)}\right )-\log \left (1+e^{i (2 a+2 b x)}\right )\right )-2 a \log \left (\tan \left (\frac {1}{2} (2 a+2 b x)\right )\right )+i \left (\operatorname {PolyLog}\left (2,-e^{i (2 a+2 b x)}\right )-\operatorname {PolyLog}\left (2,e^{i (2 a+2 b x)}\right )\right )\right )}{2 b^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 207 vs. \(2 (59 ) = 118\).
Time = 1.01 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.93
method | result | size |
risch | \(\frac {c \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{b}-\frac {c \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}+\frac {c \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b}+\frac {d \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{b}-\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{2}}+\frac {d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a}{b^{2}}-\frac {i d \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{2}}\) | \(208\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 554 vs. \(2 (55) = 110\).
Time = 0.32 (sec) , antiderivative size = 554, normalized size of antiderivative = 7.80 \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=\frac {-i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b c - a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{2}} \]
[In]
[Out]
\[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=\int \left (c + d x\right ) \csc {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 269 vs. \(2 (55) = 110\).
Time = 0.41 (sec) , antiderivative size = 269, normalized size of antiderivative = 3.79 \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=-\frac {2 i \, b d x \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 2 i \, b c \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) - 2 \, {\left (-i \, b d x - i \, b c\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 2 \, {\left (i \, b d x + i \, b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - i \, d {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + 2 i \, d {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 i \, d {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (b d x + b c\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right )}{2 \, b^{2}} \]
[In]
[Out]
\[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=\int { {\left (d x + c\right )} \csc \left (b x + a\right ) \sec \left (b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x) \csc (a+b x) \sec (a+b x) \, dx=\int \frac {c+d\,x}{\cos \left (a+b\,x\right )\,\sin \left (a+b\,x\right )} \,d x \]
[In]
[Out]